ENT.Base = "base_entity"
ENT.Type = "brush"


function ENT:Initialize()
	
	self:SetNWInt( "PlyInsideCheckpoint", 0 )
	
end

function ENT:KeyValue( key, value )

	if ( key == "name" ) then
		if ( value == "checkpoint" ) then
			self.Trigger = true
		end
		
		self.name = value
	end
	
end

function ENT:GetKeyName()

	return self.name

end

function ENT:StartTouch( ent )

	if ( self.Trigger and ent:IsPlayer() ) then
		self:SetNWInt( "PlyInsideCheckpoint", self:GetNWInt("PlyInsideCheckpoint")+1 )
	end
	
end

function ENT:EndTouch( ent )

	if ( self.Trigger and ent:IsPlayer()) then
		self:SetNWInt( "PlyInsideCheckpoint", self:GetNWInt("PlyInsideCheckpoint")-1 )
	end
	
end